package com.cloudkinto.service.file;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.entity.FileDo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.sql.Struct;
import java.util.List;

/**
 * @author zhangyy
 * @date 2020/5/27 12:35
 * @description:
 */
public interface FileService extends IService<FileDo> {

    //将文件上传到临时路径
    SingleResult uploadTempFile(MultipartFile file, Long userId);

    Long uploadTempFile(String fileName, InputStream inputStream, Long userId);

    void uploadFileMult(String[] fileIds);

    //将临时文件转移到真正的存储路径
    void uploadFile(Long fileId);
    void uploadFile2(Long fileId,Long oldFileId);



    List<String> getFilePathMulti(String fileIds);

    //查看文件  返回文件的真实路径
    String getFilePath(Long fileId);

    String getFilePathTemp(Long fileId);

    void deleteFileMulti(String fileIds);

    //删除真实目录中的文件
    void deleteFile(Long fileId);

    //图片通过excel导入
    Long uploadExcelImage(String url,Long userId) throws FileNotFoundException;

    SingleResult uploadImageBase64(String base64, String fileName, Long currentUserId);


    Long uploadFileToFormalPath(InputStream inputStream,String fileName);

    File getFile(String url, String tempFilePath);

    void getOutput(Long fileId, HttpServletResponse response);

    void addFileMoreDo(Long fileId, Long mailId, String type);



}
